<?
	include '../inc.php';
	include 'textPreprocess.php';
	// text arrangements
	$text = textPreprocess($_POST['text']);
	// title arrangements
	$title = textPreprocess($_POST['title']);
	if($title=='')
		$title = substr($text,0,50).'···';
	// labels arrangements
	$labels = labelsPreprocess($_POST['labels']);
	// insert
	$r = query('INSERT INTO posts (father,user,timer,text,title,labels) VALUES(0,'.$_SESSION['id'].','.time().',"'.$text.'","'.$title.'","'.$labels.'");');
?>